package com.groupnections.client;

import com.google.gwt.user.client.ui.Hyperlink;
import com.google.gwt.user.client.ui.Image;
import com.google.gwt.user.client.ui.Label;
import com.google.gwt.user.client.ui.RootPanel;
import com.google.gwt.user.client.ui.VerticalPanel;
import com.groupnections.client.groups.GroupsList;
import com.groupnections.client.messages.MessagesList;

public class Groupnections {

	public static VerticalPanel vpMiddleContent = new VerticalPanel();

	public Groupnections(String[] groups) {

		RootPanel rootPanel = RootPanel.get();

		rootPanel.setSize("100%", "100%");

		Image image = new Image("filesUploaded/userImages/AllineOWatkins.jpg");
		rootPanel.add(image, 10, 6);
		image.setSize("100px", "100px");

		Label lblAllineWatkins = new Label("Alline Watkins");
		rootPanel.add(lblAllineWatkins, 140, 21);

		Hyperlink hprlnkLiveSource = new Hyperlink("LIVE SOURCE", false,
				"newHistoryToken");
		rootPanel.add(hprlnkLiveSource, 136, 88);

		Hyperlink hprlnkAboutMe = new Hyperlink("About Me", false,
				"newHistoryToken");
		rootPanel.add(hprlnkAboutMe, 328, 88);

		Label lblMyGroups = new Label("MY GROUPS");
		rootPanel.add(lblMyGroups, 10, 126);

		rootPanel.add(new GroupsList(groups), 10, 174);

		Hyperlink hprlnkNewHyperlink_1 = new Hyperlink("Wanting/Offering",
				false, "newHistoryToken");
		rootPanel.add(hprlnkNewHyperlink_1, 13, 305);

		rootPanel.add(vpMiddleContent, 185, 159);
		vpMiddleContent.setSize("100px", "100px");

		vpMiddleContent.add(new MessagesList());

	}
}
